package com.ocl.www.service;

import com.ocl.www.domain.Mailbox;
import com.ocl.www.mapper.MailboxMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by Administrator on 2016/11/24.
 */

@Service
public class MailboxService {

    @Autowired
    private MailboxMapper mailboxMapper;

    public int insertMailbox(Mailbox mailbox) throws Exception {


        return mailboxMapper.insertMailbox(mailbox);
    }

    public List<Mailbox> selectLettersOfUser(Mailbox mailbox) throws Exception  {

        return mailboxMapper.selectLettersOfUser(mailbox);

    }
}
